
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import iView from 'iview'
// import i18n from '@/locale'
import config from '@/config'
import importDirective from '@/directive'
import 'iview/dist/styles/iview.css'
import './index.less'
import '@/assets/icons/iconfont.css'

// 实际打包时应该不引入mock
// import env from '../config/env'
// env === 'development' ? require('@/mock') : ''

import {postRequest,postJsonRequest,getRequest,deleteRequest,postU} from './libs/axios'
Vue.prototype.getRequest = getRequest
Vue.prototype.postRequest = postRequest
Vue.prototype.postJsonRequest = postJsonRequest
Vue.prototype.deleteRequest=deleteRequest
Vue.prototype.postU = postU

Vue.use(iView, {
    //transfer: true,
    size: 'large',
    // i18n: (key, value) => i18n.t(key, value)
})

import ElementUI from 'element-ui';
import './element-variables.scss';
Vue.use(ElementUI, {
    // i18n: (key, value) => i18n.t(key, value)
})
// import 'form-making/dist/FormMaking.css'
// import {MakingForm} from 'form-making'
import 'syl-form-maker/dist/FormMaking.css'
import {MakingForm} from 'syl-form-maker'
Vue.component(MakingForm.name, MakingForm)

Vue.config.productionTip = false
/**
 * @description 全局注册应用配置
 */
Vue.prototype.$config = config
/**
 * 注册指令
 */
importDirective(Vue)

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    // i18n,
    store,
    render: h => h(App)
})



